﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MODEL;

namespace Service
{
    public class AreaServcie_Design: IAreaService
    {
        public Task<IEnumerable<Province>> GetAllProvinceList()
        {
            return Task.Run(() =>
            {
                return new List<Province> {
                    new Province{
                        Id = 1,
                        ProvinceName = "四川省"
                    }
                }.AsEnumerable();
            });
        }

        public Task<IEnumerable<City>> GetAllCityList()
        {
            return Task.Run(() =>
            {
                return new List<City> {
                    new City{
                         CityId = 1,
                        CityName = "成都市",
                        ProvinceId = 1
                    }
                }.AsEnumerable();
            });
        }

        public Task<IEnumerable<County>> GetAllCountyList()
        {
            return Task.Run(() =>
            {
                return new List<County> {
                    new County{
                        CountyId = 1,
                        CountyName = "双流县",
                        CityId = 1,
                        ProvinceId = 1
                    }
                }.AsEnumerable();
            });
        }

        public Task<IEnumerable<Town>> GetTownList()
        {
            return Task.Run(() =>
            {
                return new List<Town>
                {
                    new Town
                    {
                        TownId = 1,
                        TownName = "巨龙镇"
                    }
                }.AsEnumerable();
            });
        }
    }
}
